<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<fmt:setBundle basename="message" />
<title><fmt:message key="label.viewbookinghistory"/></title>
</head>
<form action="label.viewbookinghistory" method=post>
</head>
<body>
<center><h1><fmt:message key="label.viewbookinghistory"/></h1></center>


	     <c:url var ="url" scope="page" value="/BookingDetails.jsp">
         <c:param name= "id" value= ""/>
         <c:param name= "priority" value="true"/>
         <c:param name= "startDate" value=""/>
         <c:param name= "endDate" value=""/>
         <c:param name= "contactDetail" value=""/>
         <c:param name= "reason" value=""/>
         <c:param name= "validateBy" value="true"/>
         <c:param name= "validateOn" value= ""/>
         <c:param name= "status" value=""/>
         <c:param name= "userId" value=""/>
         <c:param name= "emergency" value=""/>
         <c:param name= "facilityName" value=""/>
         <c:param name= "bookOn" value="true"/>    
      </c:url>
        <br/><br/>

        	
        <table>
        <tr>
          <th>#</th>
                <th><fmt:message key="label.booking.id"/></th>
                <th><fmt:message key="label.booking.priority"/></th>
                <th><fmt:message key="label.booking.startDate"/></th>
                <th><fmt:message key="label.booking.endDate"/></th>
                <th><fmt:message key="label.booking.contactDetail"/></th>
                <th><fmt:message key="label.booking.reason"/></th>
                <th><fmt:message key="label.booking.validateBy"/></th>
                <th><fmt:message key="label.booking.validateOn"/></th>
                <th><fmt:message key="label.booking.status"/></th>
                <th><fmt:message key="label.booking.userId"/></th>
                <th><fmt:message key="label.booking.emergency"/></th>
 				<th><fmt:message key="label.booking.facilityName"/></th>
                <th><fmt:message key="label.booking.bookOn"/></th>
                <th><fmt:message key="label.bookingdetails"/></th>
                <th><fmt:message key="label.delete"/></th>
        </tr>
        <c:forEach var="booking" items="${bookings}" varStatus="status">
                <tr>
                    <td >${status.index + 1}</td>
                    <td >${booking.id}</td>
                    <td >${booking.priority}</td>
                    <td >${booking.startDate}</td>
                    <td >${booking.endDate}</td>
                    <td >${booking.contactDetail}</td>
                    <td >${booking.reason}</td>
                    <td >${booking.validateBy}</td>
                    <td >${booking.validateOn}</td>
                    <td >${booking.status}</td>
                    <td >${booking.userId}</td>
                    <td >${booking.emergency}</td>
                    <td >${booking.facilityName}</td>
					<td >${booking.bookOn}</td>
          			<td >
                        <c:url var="updurl" scope="page" value="/BookingDetails.jsp">
                            <c:param name="id" value="${booking.id}"/>
                            <c:param name="priority" value="${booking.priority}"/>
                            <c:param name="startDate" value="${booking.startDate}"/>
                            <c:param name="endDate" value="${booking.endDate}"/>
                            <c:param name="contactDetail" value="${booking.contactDetail}"/>
                            <c:param name="reason" value="${booking.reason}"/>
                            <c:param name="validateBy" value="${booking.validateBy}"/>
                            <c:param name="validateOn" value="${booking.validateOn}"/>
                            <c:param name="status" value="${booking.status}"/>
                            <c:param name="userId" value="${booking.userId}"/>
                            <c:param name="emergency" value="${booking.emergency}"/>
                            <c:param name="facilityName" value="${booking.facilityName}"/>
                            <c:param name="bookOn" value="${booking.bookOn}"/>
                        </c:url>
                        <a href="${updurl}"><fmt:message key="label.bookingdetails"/></a> 
                    </td>
                    
                </tr>
            </c:forEach>
        </table>



</form>
</body>
</html>